Method and apparatus for adjusting the sensing threshold of a cardiac rhythm management device

ABSTRACT

A method and apparatus for automatically adjusting the sensing threshold of cardiac rhythm management devices. The invention is particularly suited for implementation in devices such as implantable cardiac pacemakers and implantable cardioverter/defibrillators. A method and apparatus are provided in which a noise level and signal level for a sensing channel are determined for each cardiac cycle with the sensing threshold of the channel being adjusted in accordance therewith.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of U.S. patent application Ser. No.10/910,193, filed on Aug. 3, 2004, which is a continuation of U.S.patent application Ser. No. 10/152,211, filed on May 20, 2002, nowissued as U.S. Pat. No. 6,772,009, which is a division of U.S. patentapplication Ser. No. 09/410,403, filed on Oct. 1, 1999, now issued asU.S. Pat. No. 6,418,343, the specifications of which are incorporated byreference herein.

FIELD OF THE INVENTION

This invention relates generally to a cardiac rhythm management devicesuch as implantable cardiac pacemakers and implantable cardiacdefibrillators. In particular the invention pertains to methods andapparatus for automatically adjusting the sensing threshold of suchdevices.

BACKGROUND

Currently available implantable cardiac rhythm management devices,including bradycardia and tachycardia pacemakers and cardiacdefibrillators, have sense amplifier circuits for amplifying andfiltering electrogram signals picked up by electrodes placed in or onthe heart and which are coupled by suitable leads to the implantablecardiac rhythm management device. In most devices, the signals emanatingfrom the sense amplifier are applied to one input of a comparatorcircuit whose other input is connected to a source of referencepotential. Only when an electrogram signal from the sense amplifierexceeds the reference potential threshold will it be treated as adetected cardiac depolarization event such as an r-wave or a p-wave. Thesource reference potential may thus be referred to as a sensingthreshold.

In the case of a programmable cardiac rhythm management device theprescribing physician can change the threshold potential of thecomparator, but in spite of the flexibility which the programmablethreshold offers, malsensing of cardiac depolarization will still occurfrequently enough to result in patient discomfort and/or deleterioushealth effects. This may be due to the fact that cardiac depolarizationevents (intrinsic beats) can result in widely different peak amplitudes,depending on patient activity body position, drugs being used, etc. Leadmovement and noise may further impede the detection of cardiacdepolarization events. Noise sources may include environmental noise,such as 60 Hz power line noise, myopotentials from skeletal muscle,motion artifacts, baseline wander and T-waves. When the peak amplitudesassociated with cardiac depolarization events become too small relativeto a programmed threshold, or when noise levels in the electrocardiogramapproach the sensing threshold, the likelihood of oversensing increases(i.e., false detection of depolarization events). If the sensingthreshold is increased too high in an attempt to overcome the effects ofnoise, on the other hand, the likelihood of undersensing (i.e., failingto detect depolarization events) is increased. There is a need,therefore, for methods and apparatus that automatically adjust thesensing thresholds of cardiac rhythm management devices on a continuousbeat-to-beat basis in a manner that better avoids both undersensing andoversensing.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for automaticallyadjusting the sensing threshold of a cardiac rhythm management device.Such a device may employ both atrial and ventricular sensing channelsfor sensing atrial and ventricular electrogram signals, where a sensingchannel includes a sensing amplifier having one of its inputs connectedby a lead to an electrode placed in proximity to either an atrium or aventricle. The output signal of the sensing amplifier is digitized andpassed to a threshold detector that determines whether the amplitude ofthe signal exceeds a sensing threshold, signifying the detection ofeither an atrial depolarization event (a p-wave) or a ventriculardepolarization event (an r-wave). The device may also include a pulsegenerator and associated control circuitry for delivering pacing pulsesto the atrium and/or ventricle in response to elapsed time intervals anddetected r-waves and p-waves.

In accordance with the invention, atrial and/or ventricular sensingthresholds are automatically adjusted in a manner that attempts toprevent noise signals from being misinterpreted as cardiacdepolarization events while at the same time avoiding undersensing ofdepolarization events that actually occur. In one embodiment, theautomatic adjustment is performed by calculating the sensing thresholdof a sensing channel based upon a measured amplitude of thedepolarization event (i.e., an r-wave or a p-wave) during the currentcardiac cycle and a measured current noise level in the channel. Acardiac cycle is defined as the interval between the beginning of oneheartbeat and the beginning of another, where the beginning of aheartbeat as defined herein is atrial systole, marked by detection of ap-wave or delivery of an atrial pace, or ventricular systole in the caseof a premature ventricular contraction or PVC. The adjustment ispreferably performed during the refractory period after either detectionof an r-wave or delivery of a ventricular pacing pulse by the device.

In a preferred embodiment, the noise level for a sensing channel ismeasured during a post-ventricular refractory period. As isconventional, both atrial and ventricular sensing channels are renderedrefractory (i.e., where the device ignores detected depolarizationevents) for a period of time immediately beginning after an r-wave or aventricular pace. Such a refractory period is referred to as theventricular refractory period (VRP) for the ventricular channel and thepost-ventricular atrial refractory period (PVARP) for the atrialchannel. The noise level for a particular channel is measured during anoise measurement window that occurs during the refractory period of thechannel, with the sensing threshold being decreased during the noisemeasurement window for the ventricular channel in order to sense loweramplitude noise activity. The amplitudes of electrogram signals thatexceed the decreased sensing threshold during the noise measurementwindow are measured, and a current noise level is computed based uponthe measured amplitudes. The computed current noise level may correspondto, for example, the maximum measured amplitude during the measurementwindow, an average measured amplitude, or a formula that takes intoaccount the maximum measured amplitude and the noise level calculatedfor a previous cardiac cycle.

In accordance with the invention, the amplitude of a depolarizationevent (i.e., a detected r-wave or a p-wave) is measured for the currentcardiac cycle and then used along with the current noise level to adjustthe sensing threshold for a sensing channel. Preferably, the sensingthreshold for a sensing channel is adjusted based upon a current averagedepolarization event amplitude computed from a combination of a previousaverage depolarization event amplitude computed for a previous cardiaccycle and, if a depolarization event is detected in the sensing channelfor the current cardiac cycle, the current measured amplitude of thedepolarization event.

If no depolarization event has been detected in a sensing channel duringthe current cardiac cycle, it may be surmised that either no such eventactually occurred, or that an event occurred but was undersensed.Because of the latter possibility, it would be desirable to adjust thesensing threshold downward (i.e., decrease the threshold) for a sensingchannel after a cardiac cycle in which no depolarization event wasdetected. In accordance with the present invention, therefore, if aheart chamber is paced during a particular cardiac cycle (i.e., becauseno intrinsic depolarization event was detected), the sensing thresholdfor that chamber's sensing channel is adjusted in a manner thatdecreases the threshold. In certain implementations, the sensingthreshold is adjusted so that it is decreased unless the noise level hasincreased from the previous cardiac cycle to such an extent that thesame or a higher sensing threshold is warranted. In a preferredembodiment, this is accomplished by performing the adjustment of thesensing threshold for the channel using an average depolarization eventamplitude computed for a previous cardiac cycle that is decreased by aspecified constant amount.

As aforesaid, when no depolarization event is detected for a particularsensing channel during a cardiac cycle, the sensing threshold for thechannel is adjusted using a decreased average depolarization eventamplitude, the effect of which is thus to decrease the threshold as longas the noise level is unchanged from the previous cardiac cycle. In thecase where no r-wave is detected and the cardiac rhythm managementdevice is operating in a demand ventricular pacing mode, a ventricularpacing pulse is delivered during the current cardiac cycle. Inaccordance with the invention, delivery of a ventricular pacing pulseduring a cardiac cycle causes the ventricular sensing threshold to beadjusted as described above in a manner that tends to decrease thethreshold. In the case where no p-wave is detected during a cardiaccycle and the device is operating in a demand atrial pacing mode,however, there are two possibilities: either an atrial pacing pulse wasdelivered in response to the non-detection of a p-wave, or an r-wave hasbeen detected that is preceded by neither an atrial pacing pulse nordetection of a p-wave. The latter situation indicates either theoccurrence of a premature ventricular contraction or undersensing of ap-wave. In accordance with the invention, non-detection of a p-wavecauses the atrial sensing threshold to be adjusted as described above ina manner that tends to decrease the threshold whether the non-detectionof the p-wave is due to delivery of an atrial pace or due to a prematureventricular contraction occurring during the current cardiac cycle. Inother embodiments, the amount by which the atrial sensing threshold isdecreased may be different depending on whether an atrial pace or apremature ventricular contraction occurred during a cardiac cycle by,for example, using separate specified constant amounts by which theaverage p-wave amplitude computed for a previous cycle is decreased.

BRIEF DESCRIPTION OF THE DRAWINGS

In the accompanying drawings described below, like numerals in differentfigures refer to corresponding elements.

FIG. 1 is a general block diagram of a cardiac rhythm management devicewhich may incorporate the autosense feature of the present invention.

FIG. 2 is a graph of an electrogram showing the noise measurement windowimplemented for ventricular autosense.

FIG. 3 is a software flow diagram of the autosense algorithm of thepresent invention following the measurement of noise for ventricularautosense.

FIG. 4 is a graph of an electrogram showing the noise measurementinterval implemented for atria autosense.

FIGS. 5 and 6 together is a software flow diagram of the autosensealgorithm of the present invention following the measurement of noisefor atrial autosense.

FIG. 7 is a software flow diagram of an alternate autosense algorithm ofthe present invention for atrial autosense.

FIG. 8 is a software flow diagram of an alternate autosense algorithm ofthe present invention for atrial autosense.

DETAILED DESCRIPTION OF THE INVENTION

The present invention provides an improved method and apparatus forautomatically adjusting the sensing threshold of a cardiac rhythmmanagement device capable of sensing intrinsic events of a patient'sheart. Such devices in which the invention may find application includeimplantable cardiac pacemakers and implantablecardioverter/defibrillators. In accordance with the invention, thesensing threshold is automatically adjusted as a function of intrinsicbeat amplitude and noise “measured” during a predetermined periodimmediately following the intrinsic beat detection. The automaticadjustment of the sensing threshold may be implemented for both atrialand ventricular sensing channels and is referred to herein as“autosense.” The “measurement” of noise may vary depending upon the modeof autosense for example, atrial autosense or ventricular autosense. Theembodiments detailed herein are intended to be taken as representativeor exemplary of those in which the improvements of the invention may beincorporated and are not intended to be limiting.

Referring first to FIG. 1, there is illustrated by means of a blockdiagram, a hardware platform in which the autosense algorithm of thepresent invention may be utilized. Shown enclosed by the broken line box10 is circuitry which may be included within a cardiac rhythm managementdevice, such as a bradycardia pacemaker. It is seen to include a senseamplifier/filter 12 having its input connected by a pacing lead 14. Thepacing lead 14 is shown having a plurality of electrodes 16-22 coupledto lead 14 and disposed or in the heart 24. An electrogram signal istransmitted through the pacing lead 14 to the sense amplifier 12.

In FIG. 1, the lead 14 is shown as a bipolar single pass VDD or DDDlead, various forms of which are known to those skilled in the art. Inthis embodiment, the electrodes 20 and 22 are designed to detectventricular depolarization, while electrodes 16 and 18 sense atrialdepolarization. The controller 28 is coupled to power supply 40 andprovides a control output to a pulse generator 38 at appropriate times.The resulting pulses are applied over the lead 14 to the electrodes 16,18, 20 and 22 for providing electrical stimulation to the heart 24. Thearrangement shown in FIG. 1 can be used for sensing both intrinsicP-waves and R-waves as well as applying pacing pulses in the atriumand/or ventricle.

The sense amp/filter circuit 12 conditions the electrogram signal andthen applies the conditioned signal to an analog-to-digital converter 26which converts the conditioned sensed signal to corresponding digitalvalues compatible with a peak detector 42. From the analog-to-digitalconverter 26, the signal is transmitted to both peak detector 42 and acomparator 30. In certain embodiments, the peak detector may include adigital comparator and register, wherein the signal transmitted from theA/D converter 26 is continuously compared with an initial value storedin the peak detector register. If the current signal is greater than thevalue stored in the peak detector, the current value is loaded into theregister value and is then stored in the peak detector register. Thepeak detector 42 includes a clearing mechanism controlled by thecontroller 28. Timers to activate and deactivate the peak detector,either external or internal to the controller 28, may also be included.Once the peak detector 42 times out, the final peak detector registervalue is transmitted to the controller 28. As aforesaid, the signaltransmitted from the A/D converter 26 is also applied to an input of thecomparator 30, with the reference input of the comparator coming fromthe contents of register ATH. An interrupt is generated to thecontroller 28 by the comparator 30 when the signal from the A/Dconverter 26 exceeds the digital value stored in register ATH, allowingthe controller 28 to read the corresponding value stored in peakdetector 42 and obtain the maximum value of the sensed signal. Thecontents of register ATH may thus provide a sensing threshold so thatsensed signal having amplitudes below the threshold can be ignored. Thecontents of register ATH may be updated by the controller 28 inaccordance with programmed algorithms to be described below.

The drawing of FIG. 1 shows only one hardware configuration in which theautosense algorithm of the present invention can be implemented. Thoseskilled in the art can appreciate that the circuit of FIG. 1 can bemodified so that, for example, the digital comparator 30 and ATHregister 32 can be internal to the controller 28. It is also possible toadd an additional digital comparator in parallel with the digitalcomparator 30 and provide a separate threshold register forcorresponding sensing threshold (ST) rather than time sharing thedigital comparator 30 between the detection of cardiac depolarizationand noise. The controller 28 may be in any of several forms including adedicated state device or a microprocessor with code, and may includeROM memory 34 for storing programs to be executed by the controller 28and RAM memory 36 for storing data.

The operation of the autosense algorithm of the present invention isbased upon the detection and measurement of noise during a periodfollowing a cardiac depolarization or pacing event. (As used herein, theterm “depolarization” refers to a detected intrinsic depolarization andnot to depolarization produced by a pacing pulse. Although pacing pulsesproduce cardiac depolarizations, these depolarizations are not usuallydetected by cardiac rhythm management devices because the sensingamplifiers are “blanked” and the sensing channel rendered refractory fora predetermined period following a pace.) The method of measuring noisemay be modified depending upon the hardware constraints of the rhythmmanagement device and whether the device is operating in atrialautosense or ventricular autosense. Atrial autosense refers to theautomatic adjustment of the atrial sensing threshold, while ventricularautosense refers to the automatic adjustment of the ventricular sensingthreshold. As will be described in greater detail below, ventricularautosensing is performed following a ventricular depolarization orventricular pace and during a predetermined portion of a subsequentrefractory period (i.e., the VRP). During the autosense operation, thesensing threshold is reduced, and the amplitude of each noise deflectionis determined. The atrial autosense operation is also performedfollowing a cardiac depolarization and during a predetermined period(which may coincide with the PVARP), the noise amplitude may bedetermined. Because the atrial refractory period extends from an atrialdepolarization or atrial pace through the AV interval and then beyondthe ventricular depolarization or pace (i.e., the PVARP), bothventricular and atrial autosensing may be performed during the atrialand ventricular refractory periods that occur during each cardiac cycle.A cardiac cycle is defined as the interval between the beginning of oneheartbeat and the beginning of another, where the beginning of aheartbeat is atrial systole, marked by detection of a p-wave or deliveryof an atrial pace, or ventricular systole in the case of a prematureventricular contraction or PVC.

The current noise level may be determined as a function of the measurednoise amplitude during the predetermined periods described above, e.g.,as the maximum measured amplitude. In an alternate embodiment, the noiselevel is estimated and the number of deflections exceeding the sensingthreshold is determined over a predetermined period following a cardiacdepolarization. From the current noise level, the sensing threshold maybe automatically adjusted by the controller 28, and updating of sensingthreshold may be done on a beat-by-beat basis.

Referring to FIG. 2, there is shown an electrogram signal as it relatesto an implantable cardiac rhythm management device operating in aventricular autosense mode and incorporating the improvements of thepresent invention. The electrogram signal represented by the waveform 50includes a cardiac depolarization or r-wave deflection 52 and numerousnoise deflections 54. The device is shown as including a sensingthreshold which is represented by line 56 and a refractory periodrepresented by line 58. The sensing threshold 56 may be implemented toeffectively block out sensing by the controller 28 of all deflections inthe waveform 50 that do not have an amplitude value greater than thepreset sensing threshold value. As previously mentioned, a comparatormay be utilized to provide the sensing threshold, which value may be setto, for example, 0.25 mV.

During ventricular autosense, once a cardiac depolarization is detectedat t0, a refractory period is initiated and the sensing threshold 56 isreduced for a period of time (t2−t1), shown as the noise measurementwindow (NMW) 60 during the refractory period 58, such that the maximumamplitude of noise may be detected and measured. In the preferredembodiment, the NMW ends at least 10 ms prior to the end of therefractory period (t3−t2), thereby reducing the likelihood that apremature ventricular contraction (PVC) will be confused as noise.

Embodied in the controller 28 is a timer and deflection counter capableof measuring the number of deflections having an amplitude that exceedsthe sensing threshold during each predetermined period. When the timertimes out for each refractory period, the sensing threshold 56 value isadjusted by the controller 28 as a function of the measured noise andintrinsic beat. FIG. 3 shows an algorithm in flowchart form that may beimplemented by the controller 28 to adjust the sensing threshold as afunction of noise and intrinsic beat during ventricular autosense. Thisalgorithm is executed by a dedicated portion of controller 28 shown inFIG. 1.

Without any limitation intended, when an electrocardiogram excursionpicked up on lead 14 is signal processed by the sense amplifier/filtercircuit 12 and converted to a digital quantity by A/D converter 26, adigital quantity proportional to the excursion is applied to one inputof the digital comparator 30 and to the controller 28. If theelectrocardiogram excursion exceeds the ventricular sensing threshold,the controller processes the signal as a cardiac depolarization,measuring the amplitude of the depolarization wave, initiating therefractory period 58 and predetermined period, and measuring theamplitude of noise deflections detected in the noise measurement window60. Once the refractory period 58 times out, the controller 28 initiatesa sequence to determine and adjust the sensing threshold 56. Thesequence that the controller 28 follows will now be discussed. First,the detected ventricular depolarization or r-wave amplitude is“smoothed” or “averaged” according to the following equations:

Ravg(t)=R(t)/4+((3)Ravg(t−1))/4

Ravg(t)=Ravg(t−1)−rm,

wherein the first equation is applied if the detected ventriculardepolarization during the current cycle is intrinsic (See FIG. 3, block70), and the second equation is applied if no ventricular depolarizationwas detected during the current cardiac cycle resulting in delivery of apacing stimulus (see FIG. 3, block 72). R(t) is the current amplitude ofthe ventricular depolarization, Ravg(t−1) is the previous “smoothed”r-wave amplitude, and rm is a preselected constant that withoutlimitation, may range between 0.001-2.5 mV. The preselected constant,rm, will vary depending upon whether sensing in the atrial autosense orventricular autosense mode, with 0.14 mV being preferred for ventricularautosense and 0.03 mV being preferred for atrial autosense. Thoseskilled in the art will recognize and appreciate that the rm may, forconvenience be set equal to the resolution of the A/D converter 26 or amultiple thereof. Once a current “smoothed” r-wave amplitude isdetermined, then the noise level is determined (see blocks 74 and 76)from the following equation:

N(t)=Max[Min(5mV;NWAmp);0.375mV;N(t−1)−rm]

wherein NWAmp is the maximum amplitude of noise measured in the noisemeasurement window 60, N(t−1) is the previously determined noise level,and rm is a preselected constant as described previously. After thenoise level and current “smoothed” r-wave amplitude are determined, thena value for the sensing threshold may be determined according to thefollowing equation:

Stdnext(t)=Max[(Ravg(t)−N(t))/x+N(t);ymV;zN(t)]

wherein Stdnext(t) is defined as the next ventricular sensing threshold,x is a constant ranging between 1-5 with 2 being preferred for atrialautosense and 3 being preferred for ventricular autosense. In thealternative, x may be set as a function of noise. For example, thefollowing equation may apply:

x=Ravg(t)/N(t)

Likewise, x may be set equal to the current smoothed ventriculardepolarization amplitude (x=Ravg(t)), y is a constant ranging between0.05-5 mV with 0.10 mV being preferred for intrinsic atrial autosense,0.75 mV being preferred for intrinsic ventricular autosense, 1.5 m beingpreferred for paced ventricular autosense, and 0.75 mV being preferredfor paced atrial autosense; and z is a constant ranging between 1.0-5.0with 1.5 being preferred in either atrial or ventricular autosense. Inthis manner, the sensing threshold will be minimized without reducingthe threshold below an acceptable signal to noise (SNR) ratio, therebyimproving the rhythm management device's sensing performance andefficiency.

Referring next to FIG. 4, there is shown generally an electrocardiogramsignal typically received by an implantable cardiac rhythm managementdevice set in an atrial autosense mode that incorporates theimprovements of the present invention. The electrogram signalrepresented by the waveform 90 includes an atrial depolarization orp-wave deflection 92 and numerous noise deflections 94. The operation ofthe device includes an atrial sensing threshold which is represented byline 96 and a post-ventricular atrial refractory period or PVARPrepresented by line 98. Although the predetermined period or noisemeasurement window NMW is shown coinciding with the PVARP interval,those skilled in the art will appreciate that the predetermined periodmay be initiated prior to or after the PVARP is initiated and may belonger or shorter than the PVARP. Once a p-wave is detected by thecontroller 28 a timer and counter are initialized. A PVARP is startedupon detection of a ventricular depolarization or r-wave. During PVARP,all detected atrial channel deflections are presumed noise, and themaximum amplitude of the noise deflections is determined by the peakdetector 42. A conventional RC charging circuit with a long dischargingrate may also be utilized such that at the end of PVARP, the RC chargingcircuit should be discharged completely. Also, the number of detecteddeflections during the noise measurement interval are counted and thecontroller 28 ensures that the detected deflections are not resultingfrom fibrillation or atrial flutter. If the number of detecteddeflections exceeds a predetermined number, the deflections are presumednoise and the amplitude of the deflections are measured, wherein thepredetermined number will correspond to a rate between 300-600deflections/minute with 400 deflections/minute being preferred. If thenumber of deflections is less than the predetermined amount but greaterthan the Upper Rate Limit (URL—a preprogrammed maximum time that thepacer is allowed the pace) are a presumed result of result of orfibrillation.

As described in greater detail below, the software utilized by thecontroller 28 determines a value for the atrial sensing threshold fromthe amplitude of the cardiac depolarization, the maximum amplitude ofnoise during the noise measurement interval, and from the quantity ofnoise deflections detected during a previous noise measurement interval.The algorithm that may be utilized by the controller 28 during atrialautosense varies depending upon whether an atrial depolarization eventor p-wave is detected. Once an atrial depolarization is detected a timercircuit and counter are initialized. At the end of the noise measurementwindow and PVARP, the controller 28 implements the sequence shown inFIGS. 5 and 6. For ease of discussion, the following definitions applyto the symbols used in the Figures.

-   Rate_NEI=rate of counted deflections during noise measurement    interval exceeding the previous sensing threshold-   Std_next(t)=the next sensing threshold value-   Std_next(t−1)=the previous sensing threshold value-   P(t)=the current p-wave amplitude-   Nm(t)=measured noise amplitude within the current noise measurement    interval-   Pavg(t)=current smoothed p-wave amplitude value-   Pavg(t−1)=previous smoothed p-wave amplitude value-   N(t)=current noise level-   N(t−1)=previous noise level-   SNR=signal to noise ratio-   sm=constant-   RNW=retriggerable noise window

At the end of the noise measurement interval, the controller 28implements a subroutine that first determines whether the atrial eventduring the current cardiac cycle was a detected atrial depolarizationevent or delivery of an atrial pace or the (see decision block 100). Ifthe atrial event was an atrial pacing stimulus, the controller 28follows the sequence shown in FIG. 6 which is interconnected with theflowchart in FIG. 5 by connector “A”. This path is also followed if noatrial depolarization was detected in the current cardiac cycle due tothe occurrence of a premature ventricular contraction or PVC. In thecase of either an atrial pace delivered by the device in response tonon-detection of a p-wave or the occurrence of a PVC, there is thepossibility that a p-wave actually occurred but was undersensed.Furthermore, in the case of a PVC, it has been determined from patientdata that the occurrence of a PVC causes subsequent p-waves to bedecreased in amplitude. As will be described, the invention thereforeprovides that the atrial sensing threshold will be adjusted in a mannerdecreases the threshold. The formula for calculating the atrial sensingthreshold in this case results in a decreased atrial sensing thresholdunless the current noise level warrants otherwise.

If an intrinsic atrial depolarization was detected, the controller 28then determines the rate, in deflections per minute (dpm), of the numberof deflections during the noise measurement window having an amplitudethat exceeds the preceding atrial sensing threshold level (see decisionblock 102). If the rate of the number of deflections is greater than 180dpm but less than 500 dpm, the p-wave detection is ignored (see block104) and the sensing threshold value is set equal to the previoussensing threshold value (see block 106). When the rate of the number ofdeflections is greater than 180 dpm but less than 500 dpm, it isconsidered that the detected deflections are the result of atrialflutter or fibrillation. In certain embodiments, the predetermined lowerlimit may be set equal to the URL, which may preferably be set at 250dpm.

If the rate of the number of deflections is not between 180-500 dpm,then the signal to noise ratio (SNR) is determined and compared to apredetermined constant A (see decision block 108). The SNR is determinedby taking the measured amplitude of the p-wave cardiac depolarizationand dividing by the measured noise amplitude, wherein the measured noiseamplitude may be either the maximum amplitude of noise detected duringthe noise measurement interval or the average of all noise deflectionsdetected during the noise measurement interval. The predeterminedconstant A is preferably set at 2 but may range between 1.5-5. If theSNR does not exceed the preset constant A, the p-wave detection isignored, (see block 110) and the controller determines whether theprevious noise level minus a constant “sm” exceeds the measured noiselevel (see decision block 112). If the SNR exceeds the preset constantA, then the current “smoothed” or average p-wave amplitude (Pavg(t)) isdetermined (see block 114) in accordance with the following formula:

Pavg(t)=P(t)/4+((3)Pavg(t−1))/4

where P(t) is the current measured p-wave amplitude and Pavg(t−1) is thevalue for the smoothed or average p-wave amplitude for the previouscardiac cycle. Once the Pavg(t) is determined, then the controllerdetermines whether the previous noise level minus a constant “sm”exceeds the measured noise level (see decision block 112), whereconstant sm, without limitation, may range between 0.01-0.5 mV, with0.05 mV being preferred. If the previous noise level minus constant smexceeds the current measured noise amplitude, the noise level is setequal to the previous noise level minus the constant sm (see block 116),otherwise, the noise level is set equal to the measured noise amplitudewithin the current noise measurement interval (see block 118). Once anoise level value and “smoothed” p-wave value have been determined, thenext atrial sensing threshold is determined in accordance with thefollowing:

Stdnext(t)=Max[(Pavg(t)−N(t))/x+N(t);ymV;zN(t)]

where x, y, and z are constant values having a range as previouslydescribed. The controller 28 then sets the ATH 32, for example, equal tothe calculated value and atrial sensing continues with that thresholduntil autosensing is performed again during the next cardiac cycle.

Referring again to connector “A” and FIG. 6, if no atrial depolariztionwas detected so that the cardiac event was either delivery of an atrialpacing stimulus or the occurrence of a premature ventricularcontraction, following the end of the noise measurement interval thecontroller 28 determines the “smoothed” or average p-wave amplitude (seeblock 122) from the following equation:

Pavg(t)=Pavg(t−1)−sm

In an alternative embodiment, the average p-wave amplitude is calculatedas:

Pavg(t)=Pavg(t−1)(Y)

where Y is a specified constant less than 1.0. Once a value for the“smoothed” or average p-wave amplitude is determined, the controller 28then determines the rate, in deflections per minute (dpm), of the numberof deflections during the noise measurement window having an amplitudethat exceeds the preceding atrial sensing threshold level (see decisionblock 124). If the rate of the number of deflections is greater than 180dpm but less than 500 dpm, the next atrial sensing threshold is setequal to the previous atrial sensing threshold value (see block 126).

If the rate of the number of deflections is not between 180-500 dpm,then the controller determines whether the previous noise level minus aconstant “sm” exceeds the measured noise level (see decision block 128),where constant sm, without limitation, may range between 0.01-0.05 mV,with 0.05 mV being preferred. If the previous noise level minus constantsm exceeds the current measured noise amplitude, the noise level is setequal to the previous noise level minus the constant sm (see block 130),otherwise, the noise level is set equal to the measured noise amplitudewithin the current noise measurement window (see block 132). Once acurrent noise level and average p-wave amplitude have been determined,the next atrial sensing threshold is determined in accordance with thefollowing:

Stdnext(t)=Max[(Pavg(t)−N(t))/x+N(t);ymV;zN(t)]

where x, y, and z are constant values having a range as previouslydescribed. The controller 28 then sets the ATH 32, for example, equal tothe calculated atrial sensing threshold value.

Referring next to FIGS. 7 and 8, alternate preferred algorithms areshown that may be implemented by a cardiac rhythm management deviceincapable of a direct measurement of the amplitude of noise while in anatrial autosense mode. The sequence shown in FIG. 7 is implemented bythe controller 28 when the PVARP is set equal to 250 ms or the PVARPexceeds 250 ms. The sequence shown in FIG. 8 is implemented when thePVARP is less than 250 ms. In the case where PVARP exceeds 250 ms, the“smoothed” p-wave amplitude and the number of events exceeding thesensing threshold is determined over a preset period (250 ms) of time ornoise measurement interval within the PVARP interval.

The sequence shown in FIG. 7 is implemented by the controller after thenoise measurement interval or PVARP times out. The controller 28 thendetermines whether the current atrial event is a pace or detected atrialdepolarization (see decision block 140). If no p-wave is detected, sothat the event is either an atrial pace or occurrence of a prematureventricular contraction, the controller 28 calculates the currentaverage p-wave amplitude (see block 142) in accordance with thefollowing equation:

Pavg(t)=Pavg(t−1)−sm

where, without limitation, sm is a constant ranging between 0.01-0.5 mV,with 0.05 mV being preferred. If an atrial depolarization event wasdetected, the controller 28 calculates the “smoothed” or averageamplitude (see block 144) for the detected p-wave deflection inaccordance with the following equation as previously described:

Pavg(t)=P(t)/4+((3)Pavg(t−1))/4

The controller then determines the number of deflections countedexceeding the sensing threshold during the predetermined period. Ifthere were no deflections detected during the noise measurement intervaland the retriggerable noise window of 40 ms, for example. is set (seedecision block 146), then the noise level is set equal to the previoussensing threshold value (see block 148). If deflections are detectedduring the noise measurement interval, and the number of detecteddeflections exceed 3 (see decision block 150), then the noise level isset equal to the previous atrial sensing threshold value (see block148). If the number of detected deflections equals 2 (see decision block152), then the noise level is set equal to the previous noise level (seedecision block 154), otherwise the noise level is set equal to theprevious noise level minus a constant “sm” as previously described (seeblock 156). In this manner the noise level is estimated for the currentnoise measurement interval. Once the “smoothed” or average p-waveamplitude and the noise level are calculated, then the value for thenext atrial sensing threshold is determined in accordance with thefollowing:

Stdnext(t)=Max[(Pavg(t)−N(t))/x+N(t);ymV;zN(t)]

where x, y, and z are constant values having a range as previouslydescribed. The controller 28 then sets the ATH register 32, for example,equal to the calculated value and sensing continues until the nextcardiac depolarization is sensed.

As previously indicated, the sequence shown in FIG. 8 is implemented bythe controller 28 after the noise measurement window or predeterminedperiod times out and when the PVARP is less than 250 ms. When this isthe case, the controller 28 determines whether the current atrial eventis a detected atrial depolarization or delivery of an atrial pace (seedecision block 160). If no p-wave was detected so that either an atrialpace stimulus was delivered or a premature ventricular contractionoccurred, the controller 28 calculates the “smoothed” or average p-waveamplitude (see block 162) in accordance with the following equation:

Pavg(t)=Pavg(t−1)−dm

where, without limitation sm is a constant ranging between 0.01-0.5 mVwith 0.05 mV being preferred. If an atrial depolarization event wasdetected, the controller 28 calculates the “smoothed” or average p-waveamplitude (see block 164) in accordance with the following equation aspreviously described:

Pavg(t)=P(t)/4+((3)Pavg(t−1))/4

The controller then determines the number of deflections countedexceeding the atrial sensing threshold during the PVARP interval. Ifthere were no deflections detected during the noise measurement window,and the retriggerable noise window of 40 ms for example, is set (seedecision block 166), then the noise level is set equal to the previousatrial sensing threshold value (see block 168). If deflections aredetected during the noise measurement window, and the number of detecteddeflections exceed 2 (see decision block 170), then the noise level isset equal to the previous sensing threshold value (see block 168). Ifthe number of detected deflections equals 1 (see decision block 172),then the noise level is set equal to the previous noise level (seedecision block 174), otherwise, the noise level is set equal to theprevious noise level minus a constant “sm” as previously described (seeblock 176). In this manner the noise level is estimated for the currentnoise measurement interval. Once the current “smoothed” or averagep-wave amplitude and noise level are calculated, then the value for thenext atrial sensing threshold is determined in accordance with thefollowing:

Stdnext(t)=Max[(Pavg(t)−N(t))/x+N(t);ymV;zN(t)]

where x, y, and z are constant values having a range as previouslydescribed. The controller 28 then sets the ATH register 32, for example,equal to the calculated value and sensing continues.

Although the invention has been described in conjunction with theforegoing specific embodiment, many alternatives, variations, andmodifications will be apparent to those of ordinary skill in the art.Such alternatives, variations, and modifications are intended to fallwithin the scope of the following appended claims.

1. A method for automatically adjusting a sensing threshold in a cardiacrhythm management device, comprising: sensing a ventricular electrogramsignal via a ventricular sensing channel and detecting an r-wave whenthe sensed ventricular signal exceeds a ventricular sensing threshold;sensing an atrial electrogram signal via an atrial sensing channel anddetecting a p-wave when the sensed atrial signal exceeds an atrialsensing threshold; measuring the noise level of the atrial sensingchannel during a refractory period; and, decreasing the atrial sensingthreshold for a current cardiac cycle if no p-wave is detected and noatrial pace is delivered during the current cardiac cycle unless theadjusted atrial sensing threshold would then be below a specifiedminimum value or unless the noise level of the atrial sensing channelhas increased by a specified amount.
 2. The method of claim 1 wherein,if no p-wave is detected during the current cardiac cycle, the atrialsensing threshold is decreased by a first specified amount if an atrialpacing pulse is delivered at the beginning of the current cardiac cycle,and decreased by a second specified amount if an r-wave is detectedduring the current cardiac cycle with no preceding p-wave so as torepresent either a premature ventricular contraction or an atrialundersense.
 3. The method of claim 1 further comprising: measuring theamplitude of p-waves; decreasing the atrial sensing threshold within anoise measurement window that occurs during a refractory period;measuring the amplitudes of atrial electrogram signals that exceed theatrial sensing threshold during the noise measurement window andcomputing a current atrial noise level N(t) based upon the measuredamplitudes; and, adjusting the atrial sensing threshold based upon themeasured amplitude of a detected p-wave and the current noise level. 4.The method of claim 1 wherein the atrial sensing threshold is adjustedby the following formula if no p-wave is detected in the current cardiaccycle and an r-wave is detected:ST(t)=N(t)+[ST(t−1)−N(t)]/Z where ST(t) and ST(t−1) are current andprevious atrial sensing thresholds, respectively, and N(t) is thecurrent atrial noise level, and Z is a constant between 1 and
 6. 5. Themethod of claim 1 wherein the atrial sensing threshold is adjusted basedupon the current noise level and a current average p-wave amplitudecomputed from a combination of a previous average p-wave amplitudecomputed for a previous cardiac cycle and, if a p-wave is detected inthe current cardiac cycle, the current p-wave amplitude.
 6. The methodof claim 5 wherein the current average p-wave amplitude Pavg(t) iscomputed according to the following formula if a p-wave is detected inthe current cardiac cycle:Pavg(t)=(A)P(t)+(B)Pavg(t−1) where A and B are constants, P(t) is thep-wave amplitude measured in the current cardiac cycle, and Pavg(t−1) isa previous average p-wave amplitude computed for a previous cardiaccycle.
 7. The method of claim 6 wherein the current average p-waveamplitude Pavg(t) is computed calculated according to the followingformula if no p-wave is detected and either an atrial pacing pulse wasdelivered or an r-wave was detected during the current cardiac cycle:Pavg(t)=Pavg(t−1)−sm where sm is a specified constant.
 8. The method ofclaim 7 wherein separate values of sm are used in computing Pavg(t)depending upon whether the non-detection of a p-wave during the currentcardiac cycle is due to an atrial pacing pulse being delivered or to theoccurrence of an r-wave with no preceding p-wave.
 9. A method forautomatically adjusting a sensing threshold in a cardiac rhythmmanagement device, comprising: sensing a ventricular electrogram signalvia a ventricular sensing channel and detecting an r-wave when thesensed ventricular signal exceeds a ventricular sensing threshold;measuring the amplitude of r-waves; decreasing the ventricular sensingthreshold within a noise measurement window that occurs during aventricular refractory period; measuring the amplitudes of ventricularelectrogram signals that exceed the decreased sensing threshold duringthe noise measurement window and computing a current ventricular noiselevel VN(t) based upon the measured amplitudes; and, adjusting theventricular sensing threshold based upon the measured amplitude of adetected r-wave and the current ventricular noise level.
 10. The methodof claim 9 wherein the ventricular sensing threshold is adjusteddownward if no r-wave is detected and a ventricular pacing pulse isdelivered during the current cardiac cycle.
 11. A cardiac rhythmmanagement device, comprising: circuitry for sensing atrial andventricular electrogram signals via atrial and ventricular sensingchannels; an atrial threshold detector for detecting p-waves when thesensed atrial electrogram signal exceeds an atrial sensing threshold; aventricular threshold detector for detecting r-waves when the sensedventricular electrogram signal exceeds a ventricular sensing threshold;circuitry for measuring the noise level of the atrial sensing channelduring a refractory period; and circuitry for decreasing the atrialsensing threshold for a current cardiac cycle if no p-wave is detectedand no atrial pace is delivered during the current cardiac cycle unlessthe adjusted atrial sensing threshold would then be below a specifiedminimum value or unless the noise level of the atrial sensing channelhas increased by a specified amount.
 12. The device of claim 11 whereinthe circuitry for decreasing the atrial sensing threshold is configuredto, if no p-wave is detected during the current cardiac cycle, decreasethe atrial sensing threshold by a first specified amount if an atrialpacing pulse is delivered at the beginning of the current cardiac cycle,and decrease the atrial sensing threshold by a second specified amountif an r-wave is detected during the current cardiac cycle with nopreceding p-wave so as to represent either a premature ventricularcontraction or an atrial undersense.
 13. The device of claim 11 furthercomprising: circuitry for measuring the amplitude of p-waves; circuitryfor decreasing the atrial sensing threshold within a noise measurementwindow that occurs during a refractory period; circuitry for measuringthe amplitudes of atrial electrogram signals that exceed the atrialsensing threshold during the noise measurement window and computing acurrent atrial noise level N(t) based upon the measured amplitudes; and,circuitry for adjusting the atrial sensing threshold based upon themeasured amplitude of a detected p-wave and the current noise level. 14.The device of claim 11 wherein the circuitry for adjusting the atrialsensing threshold is configured to adjust the atrial sensing thresholdby the following formula if no p-wave is detected in the current cardiaccycle and an r-wave is detected:ST(t)=N(t)+[ST(t−1)−N(t)]/Z where ST(t) and ST(t−1) are current andprevious atrial sensing thresholds, respectively, and N(t) is thecurrent atrial noise level, and Z is a constant between 1 and
 6. 15. Thedevice of claim 1 wherein the circuitry for adjusting the atrial sensingthreshold is configured to adjust the atrial sensing threshold basedupon the current noise level and a current average p-wave amplitudecomputed from a combination of a previous average p-wave amplitudecomputed for a previous cardiac cycle and, if a p-wave is detected inthe current cardiac cycle, the current p-wave amplitude.
 16. The deviceof claim 15 wherein the current average p-wave amplitude Pavg(t) iscomputed according to the following formula if a p-wave is detected inthe current cardiac cycle:Pavg(t)=(A)P(t)+(B)Pavg(t−1) where A and B are constants, P(t) is thep-wave amplitude measured in the current cardiac cycle, and Pavg(t−1) isa previous average p-wave amplitude computed for a previous cardiaccycle.
 17. The device of claim 16 wherein the current average p-waveamplitude Pavg(t) is computed calculated according to the followingformula if no p-wave is detected and either an atrial pacing pulse wasdelivered or an r-wave was detected during the current cardiac cycle:Pavg(t)=Pavg(t−1)−sm where sm is a specified constant.
 18. The device ofclaim 17 wherein separate values of sm are used in computing Pavg(t)depending upon whether the non-detection of a p-wave during the currentcardiac cycle is due to an atrial pacing pulse being delivered or to theoccurrence of an r-wave with no preceding p-wave.
 19. A cardiac rhythmmanagement device, comprising: circuitry for sensing a ventricularelectrogram signal via a ventricular sensing channel and detecting anr-wave when the sensed ventricular signal exceeds a ventricular sensingthreshold; circuitry for measuring the amplitude of r-waves; circuitryfor decreasing the ventricular sensing threshold within a noisemeasurement window that occurs during a ventricular refractory period;circuitry for measuring the amplitudes of ventricular electrogramsignals that exceed the decreased sensing threshold during the noisemeasurement window and computing a current ventricular noise level VN(t)based upon the measured amplitudes; and, circuitry for adjusting theventricular sensing threshold based upon the measured amplitude of adetected r-wave and the current ventricular noise level.
 20. The deviceof claim 9 wherein the circuitry for adjusting the ventricular sensingthreshold is configured to decrease the ventricular sensing threshold ifno r-wave is detected and a ventricular pacing pulse is delivered duringthe current cardiac cycle.